package com.tyut.musicdreamer.application;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;

/**
 * MusicDreamer主应用入口
 * 整合了用户服务、音乐服务、上传服务等功能
 */
@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients(basePackages = {
    "com.tyut.musicdreamer.service.search.client" // 只有搜索服务通过Feign调用
})
@ComponentScan(basePackages = {
    "com.tyut.musicdreamer.service.user",
    "com.tyut.musicdreamer.service.music",
    "com.tyut.musicdreamer.service.upload",
    "com.tyut.musicdreamer.service.gateway",
    "com.tyut.musicdreamer.application",
    "com.tyut.musicdreamer.framework",
    "com.tyut.musicdreamer.common",
    "com.tyut.musicdreamer.convention"
})
@EntityScan(basePackages = {
    "com.tyut.musicdreamer.service.user.model.entity",
    "com.tyut.musicdreamer.service.music.model.entity",
    "com.tyut.musicdreamer.service.upload.model.entity"
})
@EnableJpaRepositories(basePackages = {
    "com.tyut.musicdreamer.service.user.repository",
    "com.tyut.musicdreamer.service.music.repository",
    "com.tyut.musicdreamer.service.upload.repository"
})
public class MusicDreamerApplication {
    
    public static void main(String[] args) {
        SpringApplication.run(MusicDreamerApplication.class, args);
    }
} 